//
//  FetchCaptchaViewModel.swift
//  ExtremeHealth
//
//  Created by Zhongkai Li 李忠凯 on 2018/9/18.
//  Copyright © 2018 GanDongKeJi. All rights reserved.
//

import RxSwift
import Toast

struct FetchCaptchaViewModel {
    func fetch(phoneNo: String = "13223929619",
               scene: String = "1",
               disposeBag: DisposeBag) {
        Network.request(target: .getCaptcha(token: "",
                                            phoneNo: phoneNo,
                                            scene: scene),
                        success: { (obj: LoginModel) in // 这里不需要model，简单处理
                        }, failure: { (moyaError) in
                            EHToast.show(moyaError.localizedDescription)
                        }, error: { (error) in
                            EHToast.show(error)
                        }, dispose: disposeBag)
    }
}
